package zust.se.delicious.dao;

import java.util.List;

import zust.se.delicious.domain.Bookmark;
import zust.se.delicious.domain.User;

public interface BookmarkDao {
	Bookmark get(Integer id);

	Integer save(Bookmark Bookmark);

	void update(Bookmark Bookmark);

	void delete(Bookmark Bookmark);

	void delete(Integer id);

	List<Bookmark> findAll();

	Bookmark findBookmarkByUrl(String url);

	List<Bookmark> findBookmarkByUid(int uid);

	List<Bookmark> findBmFeed(final User user, final int page, final int size);

	List<Bookmark> findBmList(final User user, final int page, final int size);

	List<Bookmark> searchMyList(String keyword, int uid);

	List<Bookmark> searchOtherList(String keyword, int uid);
	
	List<Bookmark> searchAllList(String keyword);
	
	List<Bookmark> matchMyList(String url, int uid);

	List<Bookmark> matchchOtherList(String url, int uid);
	
	List<Bookmark> mathchAllList(String url);


	Long countBmByUrl(String url);

	Long countBmByOwnId(Integer uid);

	Long countBmFeed(Integer uid);

	Long countBmList(Integer uid);
}
